﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SearchUser.aspx.cs" Inherits="Recon.Portal.WebUI.SearchUser" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Search User</title>
     <link href="../css/Main.css" rel="stylesheet" type="text/css" />
    <link href="css/Site.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="page">
    <form id="form1" runat="server">
    <div  style="width:60%">
    <table cellspacing="1" cellpadding="1" border="0" width = "60%">
        <tr>
        <td align="right">
            Search on User Id:
        </td>
        <td>
            <asp:TextBox ID="txtUserId" runat="server" Width="350px" ></asp:TextBox>
            &nbsp; &nbsp;
            <asp:Button ID="btnsearch" runat="server" OnClick="btnsearch_Click" Text="Search" TabIndex="1" /></td>
        </tr>
         <tr>
            <td colspan="2">
                <asp:Label ID="lblusercnt" runat="server" Width="563px" CssClass="lable"></asp:Label></td>
        </tr>
        <tr>
            <td align="center" colspan="2">
  <div style="height:380px; width:650px; overflow:auto;">
        <asp:GridView ID="gvUser" runat="server"  OnSelectedIndexChanging="gvUser_SelectedIndexChanging" OnSelectedIndexChanged="gvUser_SelectedIndexChanged" 
        Width="100%" AutoGenerateColumns="False" TabIndex="2" HeaderStyle-BackColor="#222222" HeaderStyle-ForeColor="#6f788f" ForeColor="#333333" HeaderStyle-Font-Bold="false">
            <Columns>
               
               <asp:TemplateField HeaderText="User ID" ShowHeader="False">
                   <ItemTemplate>
                       <asp:LinkButton ID="lbtnuserid" runat="server" CausesValidation="False" CommandName="Select"
                           Text='<%# Eval("UserID") %>'></asp:LinkButton>
                   </ItemTemplate>
               </asp:TemplateField>
                         
            <asp:TemplateField HeaderText="User Name">                                   
                <ItemTemplate>
                    <asp:Label ID="lblUserName" runat="server" Text='<%# Eval("UserName") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
                       
            </Columns>
            <HeaderStyle BackColor="silver" Font-Bold="false" ForeColor="#6f788f"/>
        </asp:GridView>
        </div>
            </td>
        </tr>
    </table>
        <input id="control" runat="server" name="control" type="hidden" />
        <input id="path" runat="server" name="path" type="hidden" />
</div>

    <%--<div class="formDiv">
    <h2 class="formTitle">Search User</h2>
	<span id="mandatoryMessage" class="formError">Fields marked with * are mandatory</span>
    <input id="txtUser"  name="control" runat="server" type="hidden">
    <table id="Table1" cellspacing="1" cellpadding="1" border="0" class="FormTable">
        <caption style="font-size: 18px" valign="top">
            Search User</caption>
        <tr>
            <td class="LeftPrompt">
                User Id
            </td>
            <td class="RightPrompt">
                <asp:TextBox ID="txtUserId" runat="server" ></asp:TextBox>
                <input id="userId"  type="hidden" name="control" runat="server" />&nbsp;<asp:Button
                    ID="btnGo" runat="server" Text="Go"  OnClick="btnGo_Click" />&nbsp;<asp:Button
                        ID="btnClear" runat="server" Text="Clear"  TabIndex="3"
                        CausesValidation="False" OnClick="btnClear_Click" />
                &nbsp;
                <asp:RegularExpressionValidator ID="regUserId" runat="server" ControlToValidate="txtUserId"
                     Display="None" ErrorMessage="User Id should contain only numbers, alphabets &amp; underscore."
                    SetFocusOnError="True" ValidationExpression="\w+([-+.']\w+)*"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td class="LeftPrompt" colspan="2">
                <asp:Label runat="server" ID="lblNoRecord" Visible="false"></asp:Label>
                <asp:GridView ID="grvUsers" runat="server"  AllowPaging="true"
                    AutoGenerateColumns="False" OnDataBound="grvUsers_DataBound" OnPageIndexChanging="grvUsers_PageIndexChanging"
                    OnSelectedIndexChanged="grvUsers_SelectedIndexChanged">
                    <Columns>
                        <asp:BoundField DataField="user_id" HeaderText="UserId" />
                        <asp:TemplateField HeaderText="UserId">
                            <ItemTemplate>
                                <asp:LinkButton ID="userID" runat="server" CausesValidation="False" CommandName="Select"
                                    Text='<%# Eval("user_id") %>' ToolTip="Click here to Select"></asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="user_name" HeaderText="Name" />
                    </Columns>
                    <PagerStyle />
                </asp:GridView>
            </td>
        </tr>
    </table>
    </div>--%>
    </form>
    </div>
</body>
</html>
